﻿using FirstFloor.ModernUI.Presentation;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SelElectCalcModernUI.Model
{
    public class KeyValuePair<T,K>
        : NotifyPropertyChanged
    {
        T key;
        K value;
        public static ObservableCollection<KeyValuePair<T, K>> CreatList(params T[] keys)
        {
            ObservableCollection<KeyValuePair<T, K>> res = new ObservableCollection<KeyValuePair<T, K>>();
            foreach (var key in keys)
            {
                res.Add(new KeyValuePair<T, K>() { Key = key});
            }
            return res;
        }
        public T Key
        {
            get
            {
                return key;
            }

            set
            {
                key = value;
                OnPropertyChanged("Key");
            }
        }

        public K Value
        {
            get
            {
                return value;
            }

            set
            {
                this.value = value;
                OnPropertyChanged("Value");
            }
        }
    }
}
